/**
  ******************************************************************************
  * @file   : pwm.h
  * @author : 测试1组（houtiezhu）
  * @version: v0
  * @date   : 2019.07.09
  * @brief  :
  *
  * Copyright (C) 2019  Hangzhou SDIC Microelectronics Co., Ltd
  ******************************************************************************
**/

#ifndef PWM_H
#define PWM_H
#include "define.h"
#include "SD93F115B_pwm.h"


#define  PUMPPWM_EN				PWM_PDM_Cmd(PWM1 ,ENABLE)
#define  PUMPPWM_DIS			{PWM_SetDutyCycle(PWM1,0);/*PWM_PDM_Cmd(PWM1 ,DISABLE);*/}
//#define  PUMPPWMValue(DATA)			PWM_DataSet(PWM1 ,uint32_t  DATA );

#define  VALVEPWM_EN			//TC0M |= 0X80;
#define  VALVEPWM_DIS			//			TC0M &= 0X7F;
#define  VALVEPWMValue			//		TC0D


#define  OUT_VALVE(x) 			{if(x)GPIO1->ODR = (GPIO1->ODR|(1 << 7));else GPIO1->ODR = (GPIO1->ODR&(~(1 << 7))); }

extern  uint8  	BB;
extern uint8   InflateValueSet;
extern uint16 PUMPPWMValue;


void PumpOff(void);
void PumpUp(uint8 speed);
void iocontroloff(void);
void iocontrolon(void) ;
void UserPwm1_Init(void);
void PumpPwm(void);
void ValvePwm(void);

#endif



/************************ (C) COPYRIGHT Hangzhou SDIC Microelectronics *****END OF FILE****/
